package net.aiion.weave.impl.xml.events;

import net.aiion.weave.spi.xml.events.DocumentTypeDefinitionXmlEvent;

public class DocumentTypeDefinitionXmlEventImpl extends XmlEventImpl implements DocumentTypeDefinitionXmlEvent
{
    private final String documentTypeDefinition;

    public DocumentTypeDefinitionXmlEventImpl(final String aDocumentTypeDefinition) {
        documentTypeDefinition = aDocumentTypeDefinition;
    }

    @Override
    public int getType() {
        return DOCUMENT_TYPE_DEFINITION;
    }

    @Override
    public String getDocumentTypeDefinition() {
        return documentTypeDefinition;
    }

    @Override
    public String toString() {
        final StringBuilder builder = new StringBuilder();
        builder.append("XmlDocumentTypeDefinitionImpl[documentTypeDefinition=");
        builder.append(documentTypeDefinition);
        builder.append("]");
        return builder.toString();
    }
}
